<?php
return [
    'service_manager' => [
        'factories' => [
            \ApigilityActivity\V1\Rest\Activity\ActivityResource::class => \ApigilityActivity\V1\Rest\Activity\ActivityResourceFactory::class,
            \ApigilityActivity\V1\Rest\Review\ReviewResource::class => \ApigilityActivity\V1\Rest\Review\ReviewResourceFactory::class,
        ],
    ],
    'router' => [
        'routes' => [
            'apigility-activity.rest.activity' => [
                'type' => 'Segment',
                'options' => [
                    'route' => '/activity/activity[/:activity_id]',
                    'defaults' => [
                        'controller' => 'ApigilityActivity\\V1\\Rest\\Activity\\Controller',
                    ],
                ],
            ],
            'apigility-activity.rest.review' => [
                'type' => 'Segment',
                'options' => [
                    'route' => '/review/review[/:review_id]',
                    'defaults' => [
                        'controller' => 'ApigilityActivity\\V1\\Rest\\Review\\Controller',
                    ],
                ],
            ],
        ],
    ],
    'zf-versioning' => [
        'uri' => [
            0 => 'apigility-activity.rest.activity',
            1 => 'apigility-activity.rest.review',
        ],
    ],
    'zf-rest' => [
        'ApigilityActivity\\V1\\Rest\\Activity\\Controller' => [
            'listener' => \ApigilityActivity\V1\Rest\Activity\ActivityResource::class,
            'route_name' => 'apigility-activity.rest.activity',
            'route_identifier_name' => 'activity_id',
            'collection_name' => 'activity',
            'entity_http_methods' => [
                0 => 'GET',
                1 => 'PATCH',
                2 => 'DELETE',
                3 => 'POST',
            ],
            'collection_http_methods' => [
                0 => 'GET',
                1 => 'POST',
                2 => 'DELETE',
            ],
            'collection_query_whitelist' => [],
            'page_size' => 25,
            'page_size_param' => null,
            'entity_class' => \ApigilityActivity\V1\Rest\Activity\ActivityEntity::class,
            'collection_class' => \ApigilityActivity\V1\Rest\Activity\ActivityCollection::class,
            'service_name' => 'Activity',
        ],
        'ApigilityActivity\\V1\\Rest\\Review\\Controller' => [
            'listener' => \ApigilityActivity\V1\Rest\Review\ReviewResource::class,
            'route_name' => 'apigility-activity.rest.review',
            'route_identifier_name' => 'review_id',
            'collection_name' => 'review',
            'entity_http_methods' => [
                0 => 'GET',
                1 => 'PATCH',
                2 => 'PUT',
                3 => 'DELETE',
            ],
            'collection_http_methods' => [
                0 => 'GET',
                1 => 'POST',
            ],
            'collection_query_whitelist' => [],
            'page_size' => 25,
            'page_size_param' => null,
            'entity_class' => \ApigilityActivity\V1\Rest\Review\ReviewEntity::class,
            'collection_class' => \ApigilityActivity\V1\Rest\Review\ReviewCollection::class,
            'service_name' => 'Review',
        ],
    ],
    'zf-content-negotiation' => [
        'controllers' => [
            'ApigilityActivity\\V1\\Rest\\Activity\\Controller' => 'HalJson',
            'ApigilityActivity\\V1\\Rest\\Review\\Controller' => 'HalJson',
        ],
        'accept_whitelist' => [
            'ApigilityActivity\\V1\\Rest\\Activity\\Controller' => [
                0 => 'application/vnd.apigility-activity.v1+json',
                1 => 'application/hal+json',
                2 => 'application/json',
            ],
            'ApigilityActivity\\V1\\Rest\\Review\\Controller' => [
                0 => 'application/vnd.apigility-activity.v1+json',
                1 => 'application/hal+json',
                2 => 'application/json',
            ],
        ],
        'content_type_whitelist' => [
            'ApigilityActivity\\V1\\Rest\\Activity\\Controller' => [
                0 => 'application/vnd.apigility-activity.v1+json',
                1 => 'application/json',
            ],
            'ApigilityActivity\\V1\\Rest\\Review\\Controller' => [
                0 => 'application/vnd.apigility-activity.v1+json',
                1 => 'application/json',
            ],
        ],
    ],
    'zf-hal' => [
        'metadata_map' => [
            \ApigilityActivity\V1\Rest\Activity\ActivityEntity::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-activity.rest.activity',
                'route_identifier_name' => 'activity_id',
                'hydrator' => \Zend\Hydrator\ClassMethods::class,
            ],
            \ApigilityActivity\V1\Rest\Activity\ActivityCollection::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-activity.rest.activity',
                'route_identifier_name' => 'activity_id',
                'is_collection' => true,
            ],
            \ApigilityActivity\V1\Rest\Review\ReviewEntity::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-activity.rest.review',
                'route_identifier_name' => 'review_id',
                'hydrator' => \Zend\Hydrator\ClassMethods::class,
            ],
            \ApigilityActivity\V1\Rest\Review\ReviewCollection::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-activity.rest.review',
                'route_identifier_name' => 'review_id',
                'is_collection' => true,
            ],
        ],
    ],
    'zf-mvc-auth' => [
        'authorization' => [
            'ApigilityActivity\\V1\\Rest\\Activity\\Controller' => [
                'collection' => [
                    'GET' => false,
                    'POST' => true,
                    'PUT' => false,
                    'PATCH' => false,
                    'DELETE' => false,
                ],
                'entity' => [
                    'GET' => false,
                    'POST' => false,
                    'PUT' => false,
                    'PATCH' => false,
                    'DELETE' => false,
                ],
            ],
        ],
    ],
];
